package common;

/**
 * 斐波那契 兔子队列
 * @author K
 * @date 2022-05-06 8:02
 */
public class Fib {
    public static int fib(int n){
        if(n==1||n==2){
            return 1;
        }
        else{
            return(fib(n-1)+fib(n-2));
        }
    }

    public static void main(String[] args) {
        for (int i = 1; i <= 30; i++) {
            System.out.println(i + " : " +fib(i));
        }
//        int fib = fib(30);
        System.out.println();
    }
}
